package com.canal.admin.dao;

import com.canal.admin.entity.data.ZcolLoginRecord;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author yangbo
 * @date 2020-07-15 17:20
 */
@Repository
public interface ZcolLoginRecordMapper {

    /**
     * 查询登录记录
     * @param itemId
     * @param phone
     * @return
     */
    List<ZcolLoginRecord> findByChannelIdAndPhone(@Param("itemId") Integer itemId,
                                            @Param("phone") String phone);

    /**
     * 得到同一渠道，多个手机的登录信息
     * @param itemId
     * @param phones
     * @return
     */
    int loginCount(@Param("itemId") Integer itemId,
                   @Param("phones") List<String> phones);
}
